package com.jmpt.fangbohui.adapter;

import java.util.ArrayList;
import java.util.List;

import cn.jpush.android.ui.h;

import com.jmpt.fangbohui.adapter.HouseSelectProportionAdapter.Holder;
import com.jmpt.fangbohui.bean.BrokersListBean.Date_row_houseEntity;
import com.jmpt.fangbohui.bean.OldHouseBean;
import com.jmpt.fangbohui.ui.holder.BrokerItemHolder;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

/**
 * 经纪人列表适配器
 * @author Victor
 *
 */
public class BrokerListAdpter extends BaseAdapter {

	private Context mContext;
	public List<Date_row_houseEntity> data = new ArrayList<Date_row_houseEntity>();
	
	public BrokerListAdpter(Context mContext) {
		this.mContext = mContext;
	}

	@Override
	public int getCount() {
		if(data != null){
			return data.size(); 
		}
		return 0;
	}

	@Override
	public Object getItem(int position) {
		return null;
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		BrokerItemHolder holder;
		if(convertView == null){
			holder = new BrokerItemHolder(mContext);
		   convertView = holder.getRootView();
		}else{
			holder = (BrokerItemHolder) convertView.getTag();
		}
		holder.setData(data.get(position));
		return convertView;
	}

}
